\section{BIT as an image editor}
\subsection{Crop}
\subsection{Cut \& Paste}
\subsection{Rotation}
\subsection{Scaling}
\subsection{Adding text to image}
\subsection{Adding simple geometric figures to image}
\subsection{Pixel transformation (1-to-1)}
\subsection{Edit current colormap}
\subsection{Edge Enhancement}
\subsection{FFT}

\subsection{Smooth}

Smoothing is implemented as simple convolution in which the convolution
matrix is a matrix of constant, i.e., every pixel is replaced
by the average of its nearest nine neighbors

$$
\left[ \matrix{ 1 & 1 & 1 \cr
                1 & 1 & 1 \cr
                1 & 1 & 1 \cr } \right]
\ceqno
$$

\subsection{Sharpening}
Sharpening, as smoothing, is done thru a convolution with
the following matrix
$$
\left[ \matrix {-1 & -2 & -1 \cr 
                -2 & 10 & -2 \cr
                -1 & -2 & -1 } \right]
\ceqno
$$
\subsection{Contrast Enhancing}
Bad lighting condition or lighing calibration often results in
images with bad contrast. There exist many techniques that
try to correct the image contrast (constrast enhancing). The
algorithm used in the \BIT program is the histogram
equalization{enhance1} method, which adjusts
the pixel intensity levels so that the resulting image is uniform,
thus maximizing the zeroth-order entropy of the image. It is 
also easy to implement. All it takes is the following transformation
$$
F(I) = {1 \over J_{\rm max} - J_{min}} \sum_k^I {n_k \over N}
\ceqno
$$
where $F$ is the mapping function that transforms the
input pixel intensity $I$ to the output pixel intensity $J$;
$N$ is the total number of pixels and $n_k$ is the
number of pixels having the intensity $k$.

The original algorithm is proposed for grayscale images
and it is extended to the color images in the \BIT program. Instead
of performing the transformation defined by \lasteq\ to
equalize the RGB histogram seperately, the \BIT program uses
a comman transforming function and applies it to the RGB colors.
The common tranformation is the one defined by gray intensity
of the image. This transformatin has the virtue of keeping
the overall RGB ratio the image. In almost all cases tested, 
the enhanced image is somewhat better and also a little brighter.

\subsection{Quantization }
Two methos of color quantization are implemented. The fast
one the octree algorithm, whcih
incidently also uses less memoery. The other method
is the median cut algorithm\cite{quant-mediancut}.
Both of the quantuzation method is followd by a
Floyd-Steinberg dithering step\cite{dither-summary}.
